package com.liy.redisson.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.data.annotation.Id;

/**
 * @author ly
 * @date 2022/11/8 10:15
 */
@Data
@TableName("product")
public class Product {

    @Id
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer price;
    @Version
    private Integer version;

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", version=" + version +
                '}';
    }

}
